package com.yz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yz.entity.Computer;
import com.yz.entity.Readroom;
import com.yz.mapper.ComputerMapper;
import com.yz.mapper.ReadroomMapper;
import com.yz.service.ComputerService;

/**
 * 电脑表实现类
 * @author 于万伟
 *
 */
@Service
public class ComputerServiceImpl implements ComputerService{
	@Autowired
	ComputerMapper computerMapper;
	@Autowired
	ReadroomMapper readroomMapper;

	@Override
	public List<Computer> getComp(Computer computerDto) {
		return computerMapper.getComp(computerDto);
	}

	@Override
	public boolean addComp(Computer computer) {
		return computerMapper.addComp(computer);
	}

	@Override
	public boolean updateComp(Computer computer) {
		return computerMapper.updateComp(computer);
	}

	@Override
	public boolean delComp(int cid) {
		return computerMapper.delComp(cid);
	}

	@Override
	public List<Readroom> getAllRead() {
		return readroomMapper.getAllRead();
	}
}
